<!DOCTYPE html>
<head>
<script type="text/javascript" src="resources/reveal-utilities.js"></script>
</head>
<body>
<div>When the caret is scrolled out, on starting typing it must be brought to the center of the control.</div>
<div style="overflow:auto; height:150px; width:300px">
<textarea name="textarea" id="textarea" rows="10" cols="10"
  style="transform:translate(110px, 110px) scale(2); height:200px"></textarea>
<div style="height:1000px"></div>
</div>
<script>

var textArea = document.getElementById("textarea");
textArea.textContent = generateNumbers(0, 500, 2, "\n");
textArea.focus();
textArea.selectionStart = 1200;
if (window.eventSender) {
    eventSender.keyDown(">");
    // If the parentNode's scrollTop is greater than 500, then the textarea
    // isn't even visible.
    document.body.innerHTML = textarea.parentNode.scrollTop < 600 ? "PASS" : "FAIL";
}

if (window.testRunner) {
    testRunner.dumpAsText();
}

</script>
</body>
